library(tidyverse)
library(DeclareDesign)
library(rdss)

sims <- 2000
bootstrap_sims <- 2000

declaration_21b <-
  declare_model(N = 100,
                U = rnorm(N),
                potential_outcomes(Y ~ 0.1 * Z + U)) +
  declare_inquiry(SATE = mean(Y_Z_1 - Y_Z_0)) +
  declare_assignment(Z = complete_ra(N)) +
  declare_measurement(Y = reveal_outcomes(Y ~ Z)) +
  declare_estimator(Y ~ Z, inquiry = "SATE")

diagnosis_21b <-
  declaration_21b |>
  diagnose_design(sims = sims, bootstrap_sims = bootstrap_sims)

write_rds(diagnosis_21b, file = "diagnosis_objects/diagnosis_21b.rds")
